package com.hyper_yang.javase.reflection_annotation.method;

public class Person {
    public void eat(String food) {
        System.out.println("父类: public void eat(String food)" + food);
    }

    void sleep() {
        System.out.println("父类: (缺省) void eat()");
    }
}

class Teacher extends Person {
    private void run(double hours) {
        System.out.println("子类: private void run(double hours)");
    }

    void study(int day) {
        System.out.println("子类: (缺省) void study(int day)");
    }

    protected void teach(String subject) {
        System.out.println("子类: protected void teach(String subject)");
    }

    public void swim() {
        System.out.println("子类: public void swm()");
    }

    private static int add(int a, int b) {
        System.out.println("private static int add(int a, int b)");
        return a + b;
    }
}
